<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理后台</title>
<link href="Css/css.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="Js/calendar.js"></script>
<script language="javascript" type="text/javascript">
<!--
function fnOnPageChanged(page) {
	g('search').action += '&page='+page;
	document.search.submit();
}
function g(id) {
	return document.getElementById(id);
}
function fnOnCreated() {
	var url = '<?php echo $this->_url('Create'); ?>&class_id=<?=$catid?>';
	document.location.href = url;
}
// -->
</script>
<style type="text/css">
<!--
body {
	background-color: #ddeef2;
}
-->
</style>
</head>
<body>
<div id="main_title"><a href="#">后台管理中心</a>—<?php echo $listTitle; ?><div class="opr"><button class="btnA" onclick="fnOnCreated();">新建发布</button></div>
</div>
<!--div id="main_title2">| <a href="#">添加帮助文档</a></div-->
<div id="main_list">
<form name="search" id="search" method="post" action="<?=$this->_url('Index')?>">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td align="center" width="25%">标题:&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="title" id="title" value="<?=$_REQUEST['title']?>" /></td>
    <td align="center" width="50%">发布时间:&nbsp;&nbsp;&nbsp;&nbsp; <input name="rstime" id="rstime" type="text" value="<?=$_REQUEST['rstime']?>" readonly="readonly" /><img style="cursor:pointer" src="Images/app.png" id="schange" alt="提交时间" onClick="show_cele_date(this,rstime)" width="18" height="18">&nbsp;-&nbsp;-<input name="retime" id="retime" type="text" value="<?=$_REQUEST['retime']?>" readonly="readonly" /><img style="cursor:pointer" src="Images/app.png" id="schange" alt="提交时间" onClick="show_cele_date(this,retime)" width="18" height="18"></td>
    <td align="center" width="15%">分类：
    <select name="pcid" id="pcid">
    <option value="0" >ALL</option>
    <?php
    foreach ($subclasses as $prow){
    ?>
    <option value="<?=$prow['class_id']?>" <?php if($_REQUEST['pcid']==$prow['class_id'])echo 'selected'; ?> ><?=$prow['name']?></option>
    <?php
    }
    ?>
    </select>
    </td>
    <td align="center"><input type="submit" name="psearch" id="psearch" value="搜索" /></td>
  </tr>
</table>
</form>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td width="30%" align="center" bgcolor="#9EC1DE" class="title">标题</td>
    <td width="30%" align="center" bgcolor="#9EC1DE" class="title">分类</td>
    <td width="10%" align="center" bgcolor="#9EC1DE" class="title">发布人</td>
    <td width="20%" align="center" bgcolor="#9EC1DE" class="title">时间</td>
    <td width="10%" align="center" bgcolor="#9EC1DE" class="title">操作</td>
  </tr>
  <?php $i = 0; foreach($rowset as $row): $css_class = $i % 2 ? 'even' : 'odd'; $rowid = array('id' => $row[$pk],'catid' => $catid,'access'=>$_REQUEST['access']); ?>
  <tr>
    <td align="center" bgcolor="#F4FAFB" class="content3"><?php echo h($row['title']); ?></td>
    <td align="center" bgcolor="#F4FAFB" class="content"><?php echo h($row['pclasses']['name']); ?></td>
    <td align="center" bgcolor="#F4FAFB" class="content"><?php echo h($row['user']['username']); ?></td>
    <td align="center" bgcolor="#F4FAFB" class="content"><?php echo h(date('Y-m-d H:i:s',$row['dateline'])); ?></td>
    <td align="center" bgcolor="#F4FAFB" class="content"><a href="<?php echo $this->_url('edit', $rowid); ?>">编辑</a> | <a href="<?php echo $this->_url('remove', $rowid); ?>" onclick="return confirm('<?php echo h(_T('ui_p_remove_confirm')); ?>');">删除</a></td>
  </tr>
  <?php $i++; endforeach; ?>
</table>
<?php if ($pager->count > 0): ?>
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td bgcolor="#FCFCFC"><input name="FirstPage" type="button" id="FirstPage" value=" |&lt; " onclick="fnOnPageChanged(<?php echo $pager->firstPage; ?>);" />
        <input name="PrevPage" type="button" id="PrevPage" value=" &lt; " onclick="fnOnPageChanged(<?php echo $pager->prevPage; ?>);" />
        <?php $pager->renderPageJumper(_T('ui_p_jump_page')); ?>
        <input name="NextPage" type="button" id="NextPage" value=" &gt; " onclick="fnOnPageChanged(<?php echo $pager->nextPage; ?>);" />
        <input name="LastPage" type="button" id="LastPage" value=" &gt;| " onclick="fnOnPageChanged(<?php echo $pager->lastPage; ?>);" />
      </td>
    </tr>
  </table>
  <?php else: // if ($pager->count > 0) ?>
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td><?php echo h(_T('ui_p_no_products')); ?></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
  <?php endif; // if ($pager->count > 0) ?>
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td><?php printf(_T('ui_p_page_info'), $pager->totalCount, $pager->count, $pager->pageCount, $pager->currentPage + 1); ?></td>
    </tr>
  </table>
</div>
<div id="main_content">
</div>
<div id="main_copy">Copyright&copy;2003 – 2009 ITeam Monkey. All Rights Reserved ITeam Monkey 版权所有 </div>
</body>
</html>
